home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Communications / pcomm / Source / help.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-12  |  2.0 KB  |  52 lines

  1. /*
  2.  * Display the help screen.  Press any key to continue.  If the ascii_hot
  3.  * string is more than 4 characters wide, this screen will look silly.
  4.  * Maybe one day, this will also contain full page descriptions of each
  5.  * command.
  6.  */
  7.  
  8. #include <stdio.h>
  9. #include <curses.h>
  10. #include "config.h"
  11. #include "misc.h"
  12.  
  13. void
  14. help_screen(hot)
  15. char *hot;
  16. {
  17.     extern int fd;
  18.     WINDOW *h_win, *newwin();
  19.  
  20.     h_win = newwin(17, 80, 0, 0);
  21.  
  22.     mvwattrstr(h_win, 1, 29, A_BOLD, "P C O M M       H E L P\n");
  23.     horizontal(h_win, 2, 0, 80);
  24.     mvwattrstr(h_win, 4, 0, A_BOLD, "       Major Functions          Utility Functions         File Functions\n\n");
  25. #ifdef OLDCURSES
  26.     mvwprintw(h_win,  6,  2, "Dialing Directory.%4.4s-D  Program Info ....%4.4s-I  Send Files ....%4.4s-U", hot, hot, hot);
  27.     mvwprintw(h_win,  7,  2, "Auto Redial ......%4.4s-R  Setup Screen ....%4.4s-S  Receive Files .%4.4s-N", hot, hot, hot);
  28. #else /* OLDCURSES */
  29.     mvwprintw(h_win,  6,  2, "Dialing Directory.%4.4s-D  Program Info ....%4.4s-I  Send Files ....%4.4s-<up>", hot, hot, hot);
  30.     mvwprintw(h_win,  7,  2, "Auto Redial ......%4.4s-R  Setup Screen ....%4.4s-S  Receive Files .%4.4s-<down>", hot, hot, hot);
  31. #endif /* OLDCURSES */
  32.     mvwprintw(h_win,  8,  2, "Keyboard Macros ..%4.4s-M  Change Directory.%4.4s-B  Pass Thru Mode.%4.4s-T", hot, hot, hot);
  33.     mvwprintw(h_win,  9,  2, "Line Settings ....%4.4s-P  Clear Screen ....%4.4s-C  Directory .....%4.4s-F", hot, hot, hot);
  34.     mvwprintw(h_win, 10,  2, "Exit Pcomm .......%4.4s-X  Toggle Duplex ...%4.4s-E  Screen Dump ...%4.4s-G", hot, hot, hot);
  35.     mvwprintw(h_win, 11,  2, "Unix Gateway .....%4.4s-4  Hang Up Phone ...%4.4s-H  Start Data Log.%4.4s-1", hot, hot, hot);
  36.     mvwprintw(h_win, 12, 28, "Printer On/Off ..%4.4s-L  Toggle Log ....%4.4s-2", hot, hot);
  37.     mvwprintw(h_win, 13, 28, "Toggle CR-CR/LF .%4.4s-3", hot);
  38.     mvwprintw(h_win, 14, 28, "Break Key .......%4.4s-7", hot);
  39.  
  40.     box(h_win, VERT, HORZ);
  41.     mvwaddstr(h_win, 16, 26, " Press any key to continue ");
  42.     wrefresh(h_win);
  43.  
  44.     wgetch(h_win);
  45.     if (fd == -1) {
  46.         werase(h_win);
  47.         wrefresh(h_win);
  48.     }
  49.     delwin(h_win);
  50.     return;
  51. }
  52.